package org.crmsystem.service.impl;

import org.crmsystem.dao.ITradeMapper;
import org.crmsystem.model.Trade;
import org.crmsystem.service.ITradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class TradeServiceImpl implements ITradeService{
	@Autowired
	private ITradeMapper iTradeMapper;
	
	/**
	 * 添加交易信息
	 */
	public int addTrade(Trade trade) {
		return iTradeMapper.addTrade(trade);
	}
	
	/**
	 * 更改交易信息
	 */
	public boolean updateTrade(Trade trade) {
		return iTradeMapper.updateTrade(trade);
	}

	/**
	 * 根据机构id获取trade对象
	 */
	public Trade getTradeByOrgId(int orgId) {
		return iTradeMapper.getTradeByOrgId(orgId);
	}
	
}
